<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>星火饮食，你想要的饮食</title>

<!-- 网页标题图标 -->
<link rel="shortcut icon" href="img/titleicon.ico" />

<!-- liteAccordion css -->
<link href="js/framework/liteAccordion/css/liteaccordion.css" rel="stylesheet" />

<link href="style/customer/templatemo_style.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="style/base/baseIndex.css">
<link rel="stylesheet" type="text/css" href="style/customer/index.css">

<!-- jQuery -->  
<script type="text/javascript" src="js/framework/jquery/jquery.js"></script>

<!-- easing -->
<script src="js/framework/liteAccordion/js/jquery.easing.1.3.js"></script>

<!-- liteAccordion js -->
<script src="js/framework/liteAccordion/js/liteaccordion.jquery.js"></script>

<!-- 工具类 -->
<script type="text/javascript" src="js/util/objectUtil.js"></script>

<!-- 初始化要调用的函数封装 -->
<script type="text/javascript" src="js/index/loadFunction.js"></script>

<!-- 初始化过程 -->
<script type="text/javascript" src="js/index/load.js"></script>

</head>
<body>

<div id="templatemo_wrapper">
	<div id="templatemo_header">
    	<div id="site_title">
	    	<a href="#" target="_parent"><img src="img/index/templatemo_logo.png" alt="logo" /><span>你想要的饮食</span></a>
        </div>
    </div> <!-- end of header -->
    
    <div id="templatemo_main">
    	
        <div id="templatemo_sidebar">
        
        	<div id="templatemo_menu">
                <ul>
                    <li><a href="index.html" class="home current_home">这里</a></li>
                    <li><a href="aboutus.html" class="aboutus">暂时</a></li>
                    <li><a href="services.html" class="services">还没</a></li>
                    <li><a href="gallery.html" class="gallery">确定</a></li>
                    <li><a href="contactus.html" class="contactus">填什么</a></li>
                </ul>    	
            </div> <!-- end of templatemo_menu -->
            
            <div class="sidebar_box">
                <h4>活动公告</h4>
                <c:forEach items="${activities}" var="activity" varStatus="activitySta">
	                <div class="sidebar_news_box <c:if test="${activitySta.last}">last_box</c:if>">
	                    <a href="activity/${activity.id}" target="_blank"><strong>${activity.name}</strong></a>
	                    <p>${activity.describe}</p>
	          		</div>
				</c:forEach>
            </div>
            
			<div class="sidebar_box">
				<h4>公司地址</h4>
					1在那山滴那边西湖旁边有一群小黄鸡<br />
					2他们活泼又聪明<br />
	                3他们卖萌又搞基<br />
				<a href="#">info@yourcompany.com</a>
			</div>

		</div> <!-- end of sidebar -->
        
        <div id="templatemo_content_wrapper">
        	
            <div id="social_box">
            	<ul>
                	<li><a href="#" class="twitter"></a></li>
                    <li><a href="#" class="facebook"></a></li>
                    <li><a href="#" class="linkedin"></a></li>
                    <li><a href="#" class="myspace"></a></li>
                    <li><a href="#" class="technorati"></a></li>
				</ul>
                <div class="cleaner"></div>
            </div> <!-- end of social box -->
            
            <div id="page_intro_flash">

				<ol>
	                <li>
	                    <h2><span>Slide One</span></h2>
	                    <div>
	                        <img src="js/framework/liteAccordion/img-demo/1.jpg" alt="image" />
	                    </div>
	                </li>
	                <li>
	                    <h2><span>Slide Two</span></h2>
	                    <div>
	                        <img src="js/framework/liteAccordion/img-demo/2.jpg" alt="image" />
	                    </div>
	                </li>
	                <li>
	                    <h2><span>Slide Three</span></h2>
	                    <div>
	                        <img src="js/framework/liteAccordion/img-demo/3.jpg" alt="image" />
	                    </div>
	                </li>
	            </ol>

            </div> <!-- end of page intro -->
            
            <div id="templatmeo_content">
            
            	<div class="content_box">
                
					<h2>本店推荐</h2>
					<div class="morediv_greate_w"><a href="#" class="more">更多</a></div>
                   	<div class="cleaner mar_bot20"></div>
                   	<ul class="index_admintuijian_ul">
						<c:forEach items="${preferentials}" var="preferential">
							<li>
			                    <div>
			                        <div id="admintuijian_extend_id_${preferential.id}" class="index_dish_extend">
			                            <c:if test="${preferential.activity!=null && preferential.discount<10 && preferential.activity.enabled==true}">
			                            	${preferential.discount}折（${preferential.activity.name}）<br>
			                            </c:if>
			                            <c:if test="${preferential.intro!=null}">${preferential.intro}<br></c:if>
										供应时间：<br>
										<c:if test="${fn:length(preferential.seriesDishProvideTimes)>0}" var="isTimesNotEmpty" scope="request">
											<c:forEach items="${preferential.seriesDishProvideTimes}" var="times">
												${times.daysOfWeek}<br>
												<fmt:formatDate value="${times.startTime}" pattern="HH:mm"/>-<fmt:formatDate value="${times.endTime}" pattern="HH:mm"/>
											</c:forEach>
											</c:if>
											<c:if test="${!isTimesNotEmpty}">暂不供应</c:if>
										<br>
										供应地点：<br>
										<c:if test="${fn:length(preferential.provideAreas)>0}" var="isAreaNotEmpty" scope="request">
				                            <c:forEach items="${preferential.provideAreas}" var="provideArea" varStatus="st">${provideArea.areaName}<c:if test="${!st.last}">,</c:if></c:forEach>
			                            </c:if>
			                            <c:if test="${!isAreaNotEmpty}">暂时没有供应地点</c:if>
			                        </div>
			                        <div id="admintuijian_info_id_${preferential.id}" class="index_dish_info">
										<img width="144px" height="144px" src="img/dishes/${preferential.imageAdd}">
										<br>
										${preferential.name}
										<br>
										<c:if test="${preferential.discount>0&&preferential.discount<10}" var="isDiscountValid" scope="request">
											<span class="old_price">原价：${preferential.price}元/份</span><br>现价：${preferential.priceDiscounted}元/份</c:if>
										<c:if test="${!isDiscountValid}">
											<span class="no_dis_price">价格：${preferential.price}元/份</span><br>
										</c:if>
										<div class="index_order_div">现在订购</div>
									</div>
								</div>
							</li>
						</c:forEach>
					</ul>
                	<div class="cleaner"></div>
                </div>
                
                <div class="content_box last_box">
                	<div class="col_w300 float_l">
                    	<h2>正在热销</h2>
                    	<div class="morediv_low_w"><a href="#" class="more">更多</a></div>
                    	<div class="cleaner mar_bot20"></div>
	                    <ul class="index_hotsell_ul">
							<c:forEach items="${hotSells}" var="hotSell">
								<li>
				                    <div>
				                        <div id="maidezuiduo_extend_id_${hotSell.id}" class="index_dish_extend">
				                            <c:if test="${hotSell.activity!=null && hotSell.discount<10 && hotSell.activity.enabled==true}">
				                            	${hotSell.discount}折（${hotSell.activity.name}）<br>
				                            </c:if>
				                            <c:if test="${hotSell.intro!=null}">${hotSell.intro}<br></c:if>
											供应时间：<br>
											<c:if test="${fn:length(hotSell.seriesDishProvideTimes)>0}" var="isTimesNotEmpty" scope="request">
												<c:forEach items="${hotSell.seriesDishProvideTimes}" var="times">
													${times.daysOfWeek}<br>
													<fmt:formatDate value="${times.startTime}" pattern="HH:mm"/>-<fmt:formatDate value="${times.endTime}" pattern="HH:mm"/>
												</c:forEach>
											</c:if>
											<c:if test="${!isTimesNotEmpty}">暂不供应</c:if>
											<br>
											供应地点：<br>
											<c:if test="${fn:length(hotSell.provideAreas)>0}" var="isAreaNotEmpty" scope="request">
					                            <c:forEach items="${hotSell.provideAreas}" var="provideArea" varStatus="st">${provideArea.areaName}<c:if test="${!st.last}">,</c:if></c:forEach>
				                            </c:if>
											<c:if test="${!isAreaNotEmpty}">暂时没有供应地点</c:if>
				                        </div>
				                        <div id="maidezuiduo_info_id_${hotSell.id}" class="index_dish_info">
											<img width="144px" height="144px" src="img/dishes/${hotSell.imageAdd}">
											<br>
											${hotSell.name}
											<br>
											<c:if test="${hotSell.discount>0&&hotSell.discount<10}" var="isDiscountValid" scope="request">
												<span class="old_price">原价：${hotSell.price}元/份</span><br>现价：${hotSell.priceDiscounted}元/份</c:if>
											<c:if test="${!isDiscountValid}">
												<span class="no_dis_price">价格：${hotSell.price}元/份</span><br>
											</c:if>
											<div class="index_order_div">现在订购</div>
										</div>
									</div>
								</li>
							</c:forEach>
						</ul>
                        <div class="cleaner h20"></div>
                    </div>
                    
                    <div class="col_w300 float_r">
                    	<h2>热门收藏</h2>
                    	<div class="morediv_low_w"><a href="#" class="more">更多</a></div>
                    	<div class="cleaner mar_bot20"></div>
	                   	<ul class="index_hotsell_ul">
							<c:forEach items="${collections}" var="collection">
								<li>
				                    <div>
				                        <div id="shoucang_extend_id_${collection.id}" class="index_dish_extend">
				                            <c:if test="${collection.activity!=null && collection.discount<10 && collection.activity.enabled==true}">
				                            	${collection.discount}折（${collection.activity.name}）<br>
				                            </c:if>
				                            <c:if test="${collection.intro!=null}">${collection.intro}<br></c:if>
											供应时间：<br>
											<c:if test="${fn:length(collection.seriesDishProvideTimes)>0}" var="isTimesNotEmpty" scope="request">
												<c:forEach items="${collection.seriesDishProvideTimes}" var="times">
													${times.daysOfWeek}<br>
													<fmt:formatDate value="${times.startTime}" pattern="HH:mm"/>-<fmt:formatDate value="${times.endTime}" pattern="HH:mm"/>
												</c:forEach>
											</c:if>
											<c:if test="${!isTimesNotEmpty}">暂不供应</c:if>
											<br>
											供应地点：<br>
											<c:if test="${fn:length(collection.provideAreas)>0}" var="isAreaNotEmpty" scope="request">
					                            <c:forEach items="${collection.provideAreas}" var="provideArea" varStatus="st">${provideArea.areaName}<c:if test="${!st.last}">,</c:if></c:forEach>
				                            </c:if>
				                            <c:if test="${!isAreaNotEmpty}">暂时没有供应地点</c:if>
				                        </div>
				                        <div id="shoucang_info_id_${collection.id}" class="index_dish_info">
											<img width="144px" height="144px" src="img/dishes/${collection.imageAdd}">
											<br>
											${collection.name}
											<br>
											<c:if test="${collection.discount>0&&collection.discount<10}" var="isDiscountValid" scope="request">
												<span class="old_price">原价：${collection.price}元/份</span><br>现价：${collection.priceDiscounted}元/份</c:if>
											<c:if test="${!isDiscountValid}">
												<span class="no_dis_price">价格：${collection.price}元/份</span><br>
											</c:if>
											<div class="index_order_div">现在订购</div>
										</div>
									</div>
								</li>
							</c:forEach>
						</ul>
                    </div>
                    
                    <div class="cleaner"></div>
                </div>
            
            </div> <!-- end of content -->
            <div id="templatemo_content_bottom"></div>
        
        </div> <!-- end of content -->
        
    	<div class="cleaner"></div>
    </div> <!-- end of main -->
    
    <div id="templatemo_footer">
    	
        <a href="index.html" class="current">Home</a> | <a href="aboutus.html">About Us</a> | <a href="services.html">Services</a> | <a href="gallery.html">Gallery</a> | <a href="contactus.html">Contact Us</a>
        
        <div class="cleaner h10"></div>
	    	
        Copyright © 2048 <a href="#">Your Company Name</a> | Template from <a href="http://www.cssmoban.com" target="_parent" title="网站模板">网站模板</a>
    
    </div> <!-- end of footer -->

</div> <!-- end of wrapper -->

</body>
</html>
